<header class="site-header sticky-top  shadow-sm">
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <div class="container">
            <a class="navbar-brand" href="/" title="{$site.title}">
                <img src="{$site.logo}">
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarTogglerDemo02">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0 navbar-left">
                    {hkcms:channel type="top" where="ismenu=1"}
                    <li class="nav-item {if $item.has_child}dropdown{/if}">
                        <a class="nav-link {$item.currentstyle} {if $item.has_child} dropdown-toggle{/if}" {if $item.has_child} role="menu" data-bs-toggle="dropdown" data-bs-reference="parent" aria-expanded="false"{/if} href="{$item.url}" target="{$item.target}" >{$item.title}</a>
                        {if $item.has_child}
                        <ul class="dropdown-menu">
                            {hkcms:channel name="$item['id']" id="son" type="son" where="ismenu=1"}
                            <li><a class="dropdown-item {$son.currentstyle}" href="{$son.url}" title="{$son.title}" target="{$son.target}" >{$son.title}</a></li>
                            {/hkcms:channel}
                        </ul>
                        {/if}
                    </li>
                    {/hkcms:channel}
                </ul>
                <ul class="navbar-nav flex-row flex-wrap ms-md-auto navbar-right pc">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false" href="#" title="搜索框，点击固定"><span><i class="fa fa-search"></i></span></a>
                        <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                            <li>
                                <form class="d-flex" action="{:url('/search/index')}" method="get">
                                    <input class="form-control" type="search" name="keyword" placeholder="关键字" aria-label="Search">
                                    <button class="btn btn-primary">搜索</button>
                                </form>
                            </li>
                        </ul>
                    </li>
                </ul>
                <form class="d-flex mobile" action="{:url('/search/index')}" method="get">
                    <input class="form-control" type="search" name="keyword" placeholder="关键字" aria-label="Search">
                    <button class="btn btn-primary">搜索</button>
                </form>
            </div>
        </div>
    </nav>
</header>